#region Summary

// 
// Owner : JackieHan 
// 
// Solution : DailyCollection 
// 
// Project : Jackie.Utility
// 
// File : CodeNotExistedException.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 编码不存在的异常
// 
// History : 
//			2011-04-29 14:28:18	    Create 
// 

#endregion

#region Using

using System;

#endregion

namespace Jackie.Utility.CustomException
{
    /// <summary> 
    /// 编码不存在的异常
    /// </summary>
    public class CodeNotExistedException : ApplicationException
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="className">对象类名</param>
        /// <param name="code">编码</param>
        public CodeNotExistedException(string className, string code)
            : base(string.Format("code[{0}] of object[{1}] has not existed!", code, className))
        {
            this.ClassName = className;
            this.Code = code;
        }

        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="className">对象类名</param>
        /// <param name="code">编码</param>
        /// <param name="message">自定义消息</param>
        public CodeNotExistedException(string className, string code,string message)
            : base(message)
        {
            this.ClassName = className;
            this.Code = code;
        }

        /// <summary>
        /// 对象类名
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 编码值
        /// </summary>
        public string Code { get; set; }
    }
}